package guda.house.dal.dao;

import guda.grape.autogen.common.page.BaseQuery;
import guda.house.dal.dataobject.BillEstateDO;

import java.util.Date;
import java.util.List;

public interface BillEstateDAO {


    Long insert(BillEstateDO billEstate);


    BillEstateDO getBillEstateById(Long billId);


    boolean delBillEstateById(Long billId);

    List<BillEstateDO> getBillEstateByIds(List idsList);

    /**
     * 清空测试用例加入的autoincrement
     */
    void cleanAutoIncrement(Long billId);

    List<BillEstateDO> selectForPage(BaseQuery baseQuery);

    int countForPage(BaseQuery baseQuery);

    void updateByIdSelective(BillEstateDO billEstate);

    List<BillEstateDO> getByYearAndMonth(Long suiteId,Integer recordYear,Integer recordMonth);

    List<BillEstateDO> selectForUnpay(BaseQuery baseQuery);

    int countForUnpay(BaseQuery baseQuery);

    Long statBill(List<Long> suitIdList,String gmtDate,Integer isPayed);

    Long statBillRate(List<Long> suitIdList,Integer recordYear,Integer isPayed);

    Long statDichanDiscount(List<Long> suitIdList,String gmtDate);

    Long statSelfDiscount(List<Long> suitIdList,String gmtDate);


    BillEstateDO selectLatest(Long suiteId);


    List<BillEstateDO> getByPayId(Long payId);


    List<BillEstateDO> getBill(List<Long> suitIdList,Date gmtStart,Date gmtEnd,Integer isPayed);

    List<BillEstateDO> getBillByYear(List<Long> suitIdList,Integer recordYear,Integer isPayed);

    List<BillEstateDO> statLastBill(List<Long> suiteIdList,Date gmtStart,Integer isPayed);

    Long statPaidBill(List<Long> billIdList);

}
